#ifndef USER_H
#define USER_H

#include <string>

#include "UserPreferences.h"

/**
 * Represents a user registered in the System.
 */
class User {
public:
  /**
   * Standard Constructor
   */
  User();

  /**
   * Constructor
   */
  User(std::string name);

  /**
   * Destructor
   */
  ~User();

  /**
   * Return the applist from the user preferences
   */
  AppList* getAppList();

private:
  friend class boost::serialization::access;
  template<class Archive>
  /**
   * Saves the preference or load preferences to / from an archive
   */
  void serialize(Archive & ar, const unsigned int version){
    ar & _name;
    ar & _prefs;
  }

  /**
   * Name of the User
   */
  std::string _name;

  /**
   * Preferences of the User
   */
  UserPreferences* _prefs;
};

#endif
